package file.day9_18.day02;

import java.io.File;
import java.io.FileFilter;

public class Test02Delete {
    public static void main(String[] args) {
        File file = new File(".");
        FileFilter filter = f -> {
            return f.isFile() && f.getName().contains("_cp");
        };
        File[] files = file.listFiles(filter);
        for (File file1 : files){
            file1.delete();
            System.out.println("删除完成");
        }
    }
}
